package com.study.thread.createThread;

public class ThreadDemo1 {
    public static void main(String[] args) {
        Thread t1 = new Thread(new ThreadDemoTest());
        t1.start();
        new Thread(() ->
                System.out.println("通过Lambda根据Runnable函数创建线程")
        ).start();

    }
}

class ThreadDemoTest implements Runnable {
    @Override
    public void run() {
        System.out.println("使用继承Runnable创建线程，启动");
    }
}

